//
//  UIImageView+url.m
//  TojoyCloud
//
//  Created by yuntai on 2017/9/28.
//  Copyright © 2017年 _Engineer_雷海洋_. All rights reserved.
//

#import "UIImageView+url.h"
#import <UIImageView+WebCache.h>


@implementation UIImageView (url)

- (void)sd_setimageWithUrlStr:(NSString *)urlStr ossType:(OSSYS)type{
    
    
     [self sd_setImageWithURL:[NSURL URLWithString:[NSString stingUrl:urlStr oss:type]] placeholderImage:[UIImage imageNamed:[NSString stingPloseHoldeUrlOss:type]]];
   
}
- (void)sd_setimageWithUrlStr:(NSString *)urlStr placeholder:(NSString *)placeholderName{
    if ([urlStr containsString:@"http://"]||[urlStr containsString:@"https://"]) {
        
        [self sd_setImageWithURL:[NSURL URLWithString:urlStr] placeholderImage:[UIImage imageNamed:placeholderName?:@"Default_Life"]];
    }else{
        [self sd_setImageWithURL:[NSURL URLWithString:[kAliOSSRootURL stringByAppendingString:urlStr]] placeholderImage:[UIImage imageNamed:placeholderName?:@"Default_Life"]];
    }

}
@end
